<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>计算1-100之间能3整除的数的和</title>
</head>

<body>
    <script>
        var add = 0;
        for (i = 1; i <= 100; i++) {
            if (i % 3 === 0) {
                add += i;
            }
        }
        console.log("1-100之间能3整除的数的和为" + add);
    </script>
</body>

</html>